﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WikiTaskProject
{
    public partial class Button : Form
    {
        public Button()
        {
            InitializeComponent();
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            int val = (int)numericUpDown1.Value;

            switch (val)
            {
                case 0:
                    {
                        button2.BackColor = Properties.Settings.Default.NoColor;
                        break;
                    }
                case 1:
                    {
                        button2.BackColor = Properties.Settings.Default.Black;
                        break;
                    }
                case 2:
                    {
                        button2.BackColor = Properties.Settings.Default.Blue;
                        break;
                    }
                case 3:
                    {
                        button2.BackColor = Properties.Settings.Default.Green;
                        break;
                    }
                case 4:
                    {
                        button2.BackColor = Properties.Settings.Default.Red;
                        break;
                    }
                case 5:
                    {
                        button2.BackColor = Properties.Settings.Default.Yellow;
                        break;
                    }
            }
        }

        private void buttonShowSplit_Click(object sender, EventArgs e)
        {
            SplitContainer form = new SplitContainer();
            form.ShowDialog();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            radioButton1.Checked = false;
        }

        private void radioButton1_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked == true)
            {
                button1.Visible = true;
                radioButton1.Checked = false;
                return;
            }
            else
            {
                button1.Visible = false;
                radioButton1.Checked = true;
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            ButtonResize form = new ButtonResize();
            form.ShowDialog();
        }



    }
}
